ac22a388949a23ddddf9de4c82764a8f55767162,src/services/org/opennms/netmgt/config/PassiveStatusConfigFactory.java,PassiveStatusConfigFactory,getMatchedServiceName,#Event#,216

Before Change


    }

    public String getMatchedServiceName(Event e) {
        PassiveEvent pe = getPassiveEventByUei(e.getUei());
        String tokenValue = null;
        String eventToken = pe.getStatusKey().getServiceName().getEventToken().getName();
        if (pe.getStatusKey().getNodeLabel().getEventToken().getIsParm() == true) {
            tokenValue = EventUtil.getNamedParmValue("parm["+ eventToken +"]", e);
        } else {
            tokenValue = getEventField(eventToken, e);
        }
        return tokenValue;
    }

    public String getMatchedIpAddr(Event e) {

After Change


     * @return The correct value of the servicename portion of the status key
     */
    public String getMatchedServiceName(Event e) {
        String eventToken = getPassiveEventByUei(e.getUei()).getStatusKey().getServiceName().getEventToken().getName();
        String expr = getPassiveEventByUei(e.getUei()).getStatusKey().getServiceName().getEventToken().getValue();
        boolean isParm = getPassiveEventByUei(e.getUei()).getStatusKey().getServiceName().getEventToken().getIsParm();
        
        String tokenValue = getValueFromFieldOrParm(e, eventToken, isParm);
        return parseExpression(tokenValue, expr);
    }

    /**